Is it possible to import a word document in the attached format. The document is in word format, but each cell in the second column should be as an Object Text. The tricky part is that there are a list of tables that are embedded to the second column. Is it possible to embedded into an OLE while importing. Is there any inbuilt script, where i can tweak some part and make it work? :-)
|
Re: Word Import customization Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS |
Re: Word Import customization Mathias Mamsch - Mon May 14 03:11:22 EDT 2012 Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS Any suggestion/recommendation about how an OLE works... To be honest, I'm not familiar with the OLE handling. I had a look at the word importing scripts, but was bit nervous about the huge size... :-( |
Re: Word Import customization Lion29 - Sat May 26 01:50:58 EDT 2012
Never mind the size of the word importer. The first thing you would need is an DXL Automation library. There are some out there, which already wrap the data model of word. The basic idea of importing text and / or OLE is that you use copy/paste to get the data to the DOORS client. You can get an example (Excel Import) here:
OleAutoObj doc = open_the_word_document ()
OleAutoObj currentRange, dataSelection
currentRange = go_to_first_paragraph(doc)
currentRange = skip_title_pages(doc)
while (true) {
Object objToImportTo = null
string sAttrToImportTo = ""
// return the paragraphs in the word document that will be imported next
dataSelection = get_next_hunk_of_data(currentRange)
if (null dataSelection) { break }
// will set the object and attribute depending on the current position and selection in the document
// might create new objects if applicable
where_do_I_need_to_import_to (currentRange, dataSelection, objToImportTo, sAttrToImportTo)
import_data (dataSelection, objToImportTo, sAttrToImportTo)
}
infoBox "Hurray!"
saveAndClose doc
// ... free ressources ...
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|